<?php

// +----------------------------------------------------------------------

// | ThinkPHP [ WE CAN DO IT JUST THINK ]

// +----------------------------------------------------------------------

// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.

// +----------------------------------------------------------------------

// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

// +----------------------------------------------------------------------

// | Author: liu21st <liu21st@gmail.com>

// +----------------------------------------------------------------------

use think\facade\Route;



//后台

Route::group(function (){

    //首页

    Route::group(function (){

        Route::rule('admin/home','admin.Home/index');

    });



    //会员管理

    Route::group(function (){

        Route::rule('admin/getMemberList','admin.Member/index');

        Route::rule('admin/showMember','admin.Member/show');

        Route::rule('admin/saveMember','admin.Member/save');

        Route::rule('admin/saveNickName','admin.Member/saveNickName');

        Route::rule('admin/exportMember','admin.Member/export');



        Route::rule('admin/getMemberDetail','admin.Member/detail');

        Route::rule('admin/assignAdviser','admin.Member/assignAdviser');

        Route::rule('admin/balanceRecharge','admin.Member/balanceRecharge');

        Route::rule('admin/balanceDeduction','admin.Member/balanceDeduction');

        Route::rule('admin/integralRecharge','admin.Member/integralRecharge');

        Route::rule('admin/integralDeduction','admin.Member/integralDeduction');

        Route::rule('admin/sendCoupon','admin.Member/sendCoupon');



        Route::rule('admin/getMemberCouponList','admin.member.Coupon/index');

        Route::rule('admin/getMemberCouponLogsList','admin.logs.Member/coupon');

        Route::rule('admin/writeOffCoupon','admin.Member/writeOffCoupon');



        Route::rule('admin/getMemberBalanceLogsList','admin.logs.Member/balance');

        Route::rule('admin/getMemberIntegralLogsList','admin.logs.Member/integral');

        Route::rule('admin/getMemberBuyLogsList','admin.logs.Member/buy');

    });



    //会员等级管理

    Route::group(function (){

        Route::rule('admin/getLevelList','admin.Level/index');

        Route::rule('admin/showLevel','admin.Level/show');

        Route::rule('admin/saveLevel','admin.Level/save');

        Route::rule('admin/delLevel','admin.Level/del');

    });



    //优惠卷

    Route::group(function (){

        Route::rule('admin/getCouponList','admin.Coupon/index');

        Route::rule('admin/showCoupon','admin.Coupon/show');

        Route::rule('admin/saveCoupon','admin.Coupon/save');

        Route::rule('admin/undercarriageCoupon','admin.Coupon/undercarriage');

        Route::rule('admin/groundingCoupon','admin.Coupon/grounding');

        Route::rule('admin/delCoupon','admin.Coupon/del');

        Route::rule('admin/chooseCoupon','admin.Coupon/choose');

    });





    //店铺设置

    Route::group(function (){

        //账号管理

        Route::rule('admin/getShopStaffList','admin.setting.ShopStaff/index');

        Route::rule('admin/showShopStaff','admin.setting.ShopStaff/show');

        Route::rule('admin/saveShopStaff','admin.setting.ShopStaff/save');

        Route::rule('admin/leaveShopStaff','admin.setting.ShopStaff/leave');

        Route::rule('admin/chooseShopStaff','admin.setting.ShopStaff/choose');



        //短信设置

        Route::rule('admin/showSmsSetting','admin.setting.Sms/show');

        Route::rule('admin/saveSmsSetting','admin.setting.Sms/save');

        Route::rule('admin/getSmsPackage','admin.setting.Sms/getSmsPackage');

        Route::rule('admin/getRechargeLogs','admin.setting.Sms/getRechargeLogs');

        Route::rule('admin/getSmsSendLogs','admin.setting.Sms/getSmsSendLogs');



        //积分设置

        Route::rule('admin/showIntegralSetting','admin.setting.Integral/show');

        Route::rule('admin/saveIntegralSetting','admin.setting.Integral/save');



        //余额设置

        Route::rule('admin/showBalanceSetting','admin.setting.Balance/show');

        Route::rule('admin/saveBalanceSetting','admin.setting.Balance/save');



        //买单设置

        Route::rule('admin/showBuySetting','admin.setting.Buy/show');

        Route::rule('admin/saveBuySetting','admin.setting.Buy/save');

    });



    //小程序

    Route::group(function (){

        //推荐小程序

        Route::rule('admin/getRecommendAppList','admin.miniapp.Recommend/index');

        Route::rule('admin/showRecommendApp','admin.miniapp.Recommend/show');

        Route::rule('admin/saveRecommendApp','admin.miniapp.Recommend/save');

        Route::rule('admin/delRecommendApp','admin.miniapp.Recommend/del');

        //主题设置

        Route::rule('admin/getStyle','admin.miniapp.Template/getStyle');

        Route::rule('admin/saveStyle','admin.miniapp.Template/saveStyle');

    });





})->middleware([\app\base\middleware\Base::class,\app\base\middleware\AdminCheck::class]);

